import Vue from 'vue'
import App from './App'
import store from "@/store/index"
import moment from "@/utils/moment"
// import Tim from '@/components/tim/index.js'
// import loadingText from '@/pageTwo/components/loading-text/loadingText.vue';
// Vue.component('loading-Text', loadingText);
import utils from '@/utils/utils'
Vue.prototype.$utils = utils

// uView
import uView from "@/plugins/uview-ui";
Vue.use(uView);

//静态文件公共路径
import URL from '@/config/url'
Vue.prototype.$static = URL.STATIC

//文件公共配置
import ENV from '@/config/url'
Vue.prototype.$env = ENV

import api from '@/service/designer'
Vue.prototype.$api = api

Vue.config.productionTip = false

import navBars from "@/components/navBars"; //自定义头部
Vue.component("nav-bars", navBars);

Vue.prototype.$moment = moment;//间戳转换时间格式
//时间戳转换时间格式
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
  return moment(dataStr*1000).format(pattern)
  // return moment("20210405", "YYYYMMDD").fromNow();
 // return moment().startOf('day').fromNow();
	// return moment().startOf('hour').fromNow();
})
// Vue.use(Tim);

App.mpType = 'app'

const app = new Vue({
    ...App,
	store,
})
app.$mount()
